# Maintainer: Bruno Pagani <archange@archlinux.org> 

pkgname=nsjail
pkgver=3.3
pkgrel=1
pkgdesc="Light-weight process isolation tool"
arch=(loong64 x86_64)
url="https://nsjail.com"
license=(Apache)
depends=(protobuf libnl)
makedepends=(git)
source=(https://github.com/google/nsjail/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
        git+https://github.com/google/kafel.git#commit=1af0975af45ca4404f357b9a4e1636f53a01bfd3)
sha256sums=('9c247d0cba565b4e3f91cc76e827ddf7f3ad499f54ba611edd25d4d7be4890c3'
            'SKIP')

prepare() {
  mv kafel ${pkgname}-${pkgver}
}

build() {
  make -C ${pkgname}-${pkgver}
}

package() {
  install -Dm755 ${pkgname}-${pkgver}/nsjail -t "${pkgdir}"/usr/bin/ 
}
